package com.xqit.ydzhkt.answer.controller;

import com.xqit.ydzhkt.answer.service.AddAnswerService;
import com.xqit.ydzhkt.entity.AnswerEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Janus on 2020/6/10
 */
@RestController
@RequestMapping("/addQuestion")
@Api(tags = "增加提问和回答")
public class AddAnswerController {
    @Autowired
    private AddAnswerService addAnswerService;
    @PostMapping("/addAnswer")
    @ApiOperation("添加一条回答")
    public void AddAnswer(int userId, int questionId, String answerContent){
        addAnswerService.addAnswer(userId, questionId, answerContent);
    }


}
